
import java.util.Scanner;

public class _06 {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
    String s = sc.nextLine();
    int st=sc.nextInt();
    int sr=sc.nextInt();
    int n=s.length();
    while(st<n){
        System.out.print(s.charAt(st));
        st+=sr;
    }
    }
	
}